package com.fsc.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;


@Data
@Builder
public class RegisterDTO {
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_-]{6,20}$", message = "用户名格式错误,请输入6-20位字母、数字、下划线、横杠组合")
    private String username;
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "1[3-9]\\d{9}",message = "请输入正确的手机号")
    private String phone;
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{6,20}$", message = "密码格式错误,请输入6-20位字符，至少一个字母和一个数字")
    private String password;
    private String role;
    private String iconUrl;
}
